{
    "templates": {
      "bottomTab": {
        "type": "container",
        "orientation": "vertical",
        "width": {
          "type": "match_parent",
          "weight": 1
        },
        "content_alignment_horizontal": "center",
        "items": [
          {
            "type": "image",
            "height": {
              "type": "fixed",
              "value": 27
            },
            "width": {
              "type": "fixed",
              "value": 27
            },
            "margins": {
              "bottom": 6
            },
            "$image_url": "image_url",
            "$tint_color": "tab_tint",
            "placeholder_color": "#2196f3"
          },
          {
            "type": "text",
            "$text": "title",
            "$text_color": "tab_tint",
            "width": {
              "type": "wrap_content"
            }
          }
        ]
      },
      "productItem": {
        "type": "container",
        "orientation": "vertical",
        "content_alignment_horizontal": "center",
        "width": {
          "type": "match_parent"
        },
        "paddings": {
          "right": 16,
          "left": 16,
          "top": 8,
          "bottom": 8
        },
        "border": {
          "stroke": {
            "color": "#d4d6d5",
            "width": 1
          },
          "corner_radius": 5
        },
        "items": [
          {
            "type": "image",
            "height": {
              "type": "fixed",
              "value": 120
            },
            "width": {
              "type": "fixed",
              "value": 120
            },
            "margins": {
              "bottom": 6
            },
            "image_url": "https://sorpizza.tj/backend/upload_product/%D0%9C%D0%B0%D1%80%D0%B3%D0%B0%D1%80%D0%B8%D1%82%D0%B0.png",
            "placeholder_color": "#2196f3"
          },
          {
            "type": "text",
            "text": "Маргарита",
            "font_size": 15,
            "font_weight": "medium",
            "text_color": "#000000",
            "margins": {
              "bottom": 6
            }
          },
          {
            "type": "text",
            "text": "от 5$",
            "font_size": 15,
            "font_weight": "medium",
            "text_color": "#129654",
            "margins": {
              "bottom": 14
            }
          },
          {
            "type": "text",
            "text": "Подробнее",
            "font_size": 14,
            "margins": {
              "bottom": 6
            },
            "paddings": {
              "right": 16,
              "left": 16,
              "top": 12,
              "bottom": 12
            },
            "border": {
              "corner_radius": 5
            },
            "text_alignment_horizontal": "center",
            "background": [
              {
                "type": "solid",
                "color": "#d4d6d5"
              }
            ]
          }
        ]
      }
    },
    "card": {
      "log_id": "div2_sample_card",
      "variables": [
        {
          "name": "bottomSelectedTab",
          "type": "integer",
          "value": 0
        }
      ],
      "variable_triggers": [
        {
          "condition": "@{bottomSelectedTab != -1}",
          "mode": "on_variable",
          "actions": [
            {
              "log_id": "changeState",
              "url": "div-action://set_state?state_id=0/fragment/@{bottomSelectedTab}"
            }
          ]
        }
      ],
      "states": [
        {
          "state_id": 0,
          "div": {
            "id": "main",
            "type": "container",
            "orientation": "vertical",
            "width": {
              "type": "match_parent"
            },
            "height": {
              "type": "match_parent"
            },
            "items": [
              {
                "id": "fragment",
                "type": "state",
                "height": {
                  "type": "match_parent",
                  "weight": 1
                },
                "width": {
                  "type": "match_parent"
                },
                "background": [
                  {
                    "type": "solid",
                    "color": "#0e000000"
                  }
                ],
                "states": [
                  {
                    "state_id": "0",
                    "div": {
                      "type": "tabs",
                      "margins": {
                        "top": 20
                      },
                      "title_paddings": {
                        "left": 20,
                        "right": 20,
                        "bottom": 20
                      },
                      "width": {
                        "type": "match_parent"
                      },
                      "height": {
                        "type": "match_parent"
                      },
                      "tab_title_style": {
                        "font_size": 15,
                        "paddings": {
                          "right": 16,
                          "left": 16,
                          "top": 8,
                          "bottom": 8
                        },
                        "corner_radius": 12,
                        "item_spacing": 4
                      },
                      "items": [
                        {
                          "title": "Пицца",
                          "div": {
                            "type": "gallery",
                            "orientation": "vertical",
                            "scrollbar": "auto",
                            "height": {
                              "type": "match_parent"
                            },
                            "items": [
                              {
                                "type": "container",
                                "orientation": "vertical",
                                "margins": {
                                  "left": 20,
                                  "top": 20,
                                  "right": 20
                                },
                                "items": [
                                  {
                                    "type": "container",
                                    "orientation": "horizontal",
                                    "margins": {
                                      "bottom": 20
                                    },
                                    "items": [
                                      {
                                        "type": "productItem",
                                        "width": {
                                          "type": "match_parent",
                                          "weight": 1
                                        },
                                        "margins": {
                                          "right": 20
                                        }
                                      },
                                      {
                                        "type": "productItem",
                                        "width": {
                                          "type": "match_parent",
                                          "weight": 1
                                        }
                                      }
                                    ]
                                  },
                                  {
                                    "type": "container",
                                    "orientation": "horizontal",
                                    "margins": {
                                      "bottom": 20
                                    },
                                    "items": [
                                      {
                                        "type": "productItem",
                                        "width": {
                                          "type": "match_parent",
                                          "weight": 1
                                        },
                                        "margins": {
                                          "right": 20
                                        }
                                      },
                                      {
                                        "type": "productItem",
                                        "width": {
                                          "type": "match_parent",
                                          "weight": 1
                                        }
                                      }
                                    ]
                                  },
                                  {
                                    "type": "container",
                                    "orientation": "horizontal",
                                    "margins": {
                                      "bottom": 20
                                    },
                                    "items": [
                                      {
                                        "type": "productItem",
                                        "width": {
                                          "type": "match_parent",
                                          "weight": 1
                                        },
                                        "margins": {
                                          "right": 20
                                        }
                                      },
                                      {
                                        "type": "productItem",
                                        "width": {
                                          "type": "match_parent",
                                          "weight": 1
                                        }
                                      }
                                    ]
                                  },
                                  {
                                    "type": "container",
                                    "orientation": "horizontal",
                                    "margins": {
                                      "bottom": 20
                                    },
                                    "items": [
                                      {
                                        "type": "productItem",
                                        "width": {
                                          "type": "match_parent",
                                          "weight": 1
                                        },
                                        "margins": {
                                          "right": 20
                                        }
                                      },
                                      {
                                        "type": "productItem",
                                        "width": {
                                          "type": "match_parent",
                                          "weight": 1
                                        }
                                      }
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        },
                        {
                          "title": "Напитки",
                          "div": {
                            "type": "text",
                            "text": "second"
                          }
                        },
                        {
                          "title": "Закуски",
                          "div": {
                            "type": "text",
                            "text": "h"
                          }
                        },
                        {
                          "title": "Салаты",
                          "div": {
                            "type": "text",
                            "text": "second"
                          }
                        }
                      ]
                    }
                  },
                  {
                    "state_id": "1",
                    "div": {
                      "type": "text",
                      "text": "history"
                    }
                  },
                  {
                    "state_id": "2",
                    "div": {
                      "type": "text",
                      "text": "basket"
                    }
                  }
                ]
              },
              {
                "type": "container",
                "orientation": "horizontal",
                "height": {
                  "type": "fixed",
                  "value": 80
                },
                "background": [
                  {
                    "type": "solid",
                    "color": "#FFF"
                  }
                ],
                "content_alignment_vertical": "center",
                "items": [
                  {
                    "type": "bottomTab",
                    "title": "Меню",
                    "image_url": "https://img.icons8.com/ios-glyphs/100/circled-menu--v1.png",
                    "tab_tint": "@{bottomSelectedTab == 0 ? '#339AF0' : '#666666'}",
                    "actions": [
                      {
                        "log_id": "tabclicked",
                        "url": "div-action://set_variable?name=bottomSelectedTab&value=0"
                      }
                    ]
                  },
                  {
                    "type": "bottomTab",
                    "title": "История заказов",
                    "image_url": "https://img.icons8.com/ios-glyphs/100/time-machine--v1.png",
                    "tab_tint": "@{bottomSelectedTab == 1 ? '#339AF0' : '#666666'}",
                    "actions": [
                      {
                        "log_id": "tabclicked",
                        "url": "div-action://set_variable?name=bottomSelectedTab&value=1"
                      }
                    ]
                  },
                  {
                    "type": "bottomTab",
                    "title": "Корзина",
                    "image_url": "https://img.icons8.com/fluency-systems-regular/100/shopping-cart--v1.png",
                    "tab_tint": "@{bottomSelectedTab == 2 ? '#339AF0' : '#666666'}",
                    "actions": [
                      {
                        "log_id": "tabclicked",
                        "url": "div-action://set_variable?name=bottomSelectedTab&value=2"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        }
      ]
    }
  }